#include "tcGame.h"
#include <GL/glu.h>

static TCGame game;

TCGame *
tcGame(void)
{
	return &game;
}
void
tcGame2D(void)
{
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	gluOrtho2D(- (float) game.general.display.width / 2.0f, (float) game.general.display.width / 2.0f, - (float) game.general.display.height / 2.0f, (float) game.general.display.height / 2.0f);
	//gluOrtho2D(0.0f, (float) game.general.display.width, 0.0f, (float) game.general.display.height);
	glMatrixMode(GL_MODELVIEW);
	glLoadIdentity();
}

void
tcGame3D(void)
{

	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	gluPerspective(45.0f, game.general.display.aspect, 1.0f, 1000.0f);
	glMatrixMode(GL_MODELVIEW);
	glLoadIdentity();
}
